<?php

namespace app\order\controller;
use app\api\logic\TestLogic;
use app\common\controller\PCBase;
use app\common\controller\DBase;
use app\common\library\Upload;
use app\common\service\CommonExportCsvTaskLogService;
use app\order\logic\OrderShipServiceLogic;
use app\product\logic\ProductLogic;
use Throwable;
use  think\App;
class OrderList extends DBase
{


    /**
     * @desc     金蚁发货回传物流单号正常
     * @date     2024/4/13
     * @author   luckyXiong
     */
    public function upJinyiTrack(){
        $data   = $this->request->get();
        $res    = (new OrderShipServiceLogic())->updateJinYiTrackingNumber($data);
        return $this->jsonMessage(200,true,'操作成功',$res);
    }

    /**
     * @desc     易境通发货回传物流单号正常
     * @date     2024/12/07
     * @author   zhangheng
     */
    public function upYiJTTrack(){
        $data   = $this->request->get();
        $res    = (new OrderShipServiceLogic())->updateJYiJTTrackingNumber($data);
        return $this->jsonMessage(200,true,'操作成功',$res);
    }


    /**
     * @desc     顺丰物流单号回传
     * @date     2024/7/12
     * @author   luckyXiong
     */
    public function sfTrackNumber(){
        $data   = $this->request->post();
        $res    = (new OrderShipServiceLogic())->sfTrackNumber($data);
        return $this->jsonMessage(200,true,'操作成功',$res);
    }


    /**
     * @desc     更新金蚁token
     * @date     2024/7/12
     * @author   luckyXiong
     */
    public function jinyiToken(){
        $data   = $this->request->post();
        $res    = (new OrderShipServiceLogic())->jinyiToken($data);
        return $this->jsonMessage(200,true,'操作成功',$res);
    }



    /**
     * @desc   shopify数据清洗
     * @author xx
     * @date 2024-07-10
     */
    public function shopifyChangePru(){
        $data  = $this->request->post();
        $res   = (new TestLogic())->shopifyChangePru();
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   导出数据处理
     * @author xx
     * @date   2024-08-10
     */
    public function exportUrl(){
        $res   = (new TestLogic())->exportUrl();
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   导出数据处理
     * @author xx
     * @date   2024-08-12
     */
    public function exportUrl_consumer(){
        $data  = $this->request->post();
        $export_id = $data['export_csv_task_id']??'';
        $task_done_no = $data['task_done_no']??'';
        $res   = (new CommonExportCsvTaskLogService())->composeCreateCsv($export_id,$task_done_no);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }



    /**
     * @desc     近一个月spu
     * @author   xx
     * @date     2024-08-15
     */
    public function spuMonth(){
        $res        = (new TestLogic())->spuMonthProduce();
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }








}